<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        function addTodo() {
            var name = document.getElementById("name").value;
            var list = document.getElementById("list");
            list.innerHTML = list.innerHTML +"<p>" + name + "</p>";
        }
    </script>
</head>
<body>
<h1> TODO - web 版</h1>
<label>请输入待办事项：</label>
<input id="name" type="text">
<button onclick="addTodo()">添加</button>
<h3>待办事项列表：</h3>
<div id="list"></div>
</body>
</html>